package com.ksm.zyz.common.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegExUtil {

	
	/**
	 * 正则验证手机号
	 * @param phone
	 * @return
	 */
	public static boolean isMobile(String phone){
		String regExp1 = "^1[3,5,7,8]\\d{9}$";
		String regExp = "^1[3,5,7,8]{1}[0-9]{9}";
		Pattern p = Pattern.compile(regExp);  
		Matcher m = p.matcher(phone.trim());
		System.out.println("---"+m.matches());
		return m.matches();
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		isMobile("13012345678");
	}

}
